home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / rpgedi1a / frmstart.frm (.txt) < prev    next >
Visual Basic Form  |  1999-10-18  |  9KB  |  259 lines

  1. VERSION 5.00
  2. Begin VB.Form frmStartup 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    ClientHeight    =   7065
  6.    ClientLeft      =   0
  7.    ClientTop       =   0
  8.    ClientWidth     =   9390
  9.    ControlBox      =   0   'False
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   7065
  12.    ScaleWidth      =   9390
  13.    ShowInTaskbar   =   0   'False
  14.    StartUpPosition =   3  'Windows Default
  15.    WindowState     =   2  'Maximized
  16.    Begin VB.PictureBox Picture1 
  17.       AutoSize        =   -1  'True
  18.       BorderStyle     =   0  'None
  19.       Height          =   6240
  20.       Left            =   4320
  21.       Picture         =   "frmStartup.frx":0000
  22.       ScaleHeight     =   6240
  23.       ScaleWidth      =   4620
  24.       TabIndex        =   6
  25.       Top             =   840
  26.       Width           =   4620
  27.    End
  28.    Begin VB.Label lblButton 
  29.       AutoSize        =   -1  'True
  30.       BackColor       =   &H00000000&
  31.       BackStyle       =   0  'Transparent
  32.       Caption         =   "Battle Sceen"
  33.       BeginProperty Font 
  34.          Name            =   "Times New Roman"
  35.          Size            =   26.25
  36.          Charset         =   0
  37.          Weight          =   400
  38.          Underline       =   0   'False
  39.          Italic          =   0   'False
  40.          Strikethrough   =   0   'False
  41.       EndProperty
  42.       ForeColor       =   &H00FFFFFF&
  43.       Height          =   600
  44.       Index           =   6
  45.       Left            =   480
  46.       TabIndex        =   7
  47.       Top             =   5760
  48.       Width           =   2610
  49.    End
  50.    Begin VB.Label lblButton 
  51.       AutoSize        =   -1  'True
  52.       BackColor       =   &H00000000&
  53.       BackStyle       =   0  'Transparent
  54.       Caption         =   "Save Game"
  55.       BeginProperty Font 
  56.          Name            =   "Times New Roman"
  57.          Size            =   26.25
  58.          Charset         =   0
  59.          Weight          =   400
  60.          Underline       =   0   'False
  61.          Italic          =   0   'False
  62.          Strikethrough   =   0   'False
  63.       EndProperty
  64.       ForeColor       =   &H00FFFFFF&
  65.       Height          =   525
  66.       Index           =   5
  67.       Left            =   480
  68.       TabIndex        =   5
  69.       Top             =   3240
  70.       Width           =   2550
  71.    End
  72.    Begin VB.Label lblButton 
  73.       AutoSize        =   -1  'True
  74.       BackColor       =   &H00000000&
  75.       BackStyle       =   0  'Transparent
  76.       Caption         =   "Resume Game"
  77.       BeginProperty Font 
  78.          Name            =   "Times New Roman"
  79.          Size            =   26.25
  80.          Charset         =   0
  81.          Weight          =   400
  82.          Underline       =   0   'False
  83.          Italic          =   0   'False
  84.          Strikethrough   =   0   'False
  85.       EndProperty
  86.       ForeColor       =   &H00FFFFFF&
  87.       Height          =   525
  88.       Index           =   0
  89.       Left            =   480
  90.       TabIndex        =   4
  91.       Top             =   1560
  92.       Width           =   3345
  93.    End
  94.    Begin VB.Image imgTitle 
  95.       Height          =   1230
  96.       Index           =   0
  97.       Left            =   120
  98.       Picture         =   "frmStartup.frx":13A87
  99.       Top             =   120
  100.       Width           =   2685
  101.    End
  102.    Begin VB.Label lblButton 
  103.       AutoSize        =   -1  'True
  104.       BackColor       =   &H00000000&
  105.       BackStyle       =   0  'Transparent
  106.       Caption         =   "Options"
  107.       BeginProperty Font 
  108.          Name            =   "Times New Roman"
  109.          Size            =   26.25
  110.          Charset         =   0
  111.          Weight          =   400
  112.          Underline       =   0   'False
  113.          Italic          =   0   'False
  114.          Strikethrough   =   0   'False
  115.       EndProperty
  116.       ForeColor       =   &H00FFFFFF&
  117.       Height          =   525
  118.       Index           =   3
  119.       Left            =   480
  120.       TabIndex        =   3
  121.       Top             =   4920
  122.       Width           =   1830
  123.    End
  124.    Begin VB.Label lblButton 
  125.       AutoSize        =   -1  'True
  126.       BackColor       =   &H00000000&
  127.       BackStyle       =   0  'Transparent
  128.       Caption         =   "Quit Game"
  129.       BeginProperty Font 
  130.          Name            =   "Times New Roman"
  131.          Size            =   26.25
  132.          Charset         =   0
  133.          Weight          =   400
  134.          Underline       =   0   'False
  135.          Italic          =   0   'False
  136.          Strikethrough   =   0   'False
  137.       EndProperty
  138.       ForeColor       =   &H00FFFFFF&
  139.       Height          =   525
  140.       Index           =   4
  141.       Left            =   480
  142.       TabIndex        =   2
  143.       Top             =   6480
  144.       Width           =   2520
  145.    End
  146.    Begin VB.Label lblButton 
  147.       AutoSize        =   -1  'True
  148.       BackColor       =   &H00000000&
  149.       BackStyle       =   0  'Transparent
  150.       Caption         =   "Load Game"
  151.       BeginProperty Font 
  152.          Name            =   "Times New Roman"
  153.          Size            =   26.25
  154.          Charset         =   0
  155.          Weight          =   400
  156.          Underline       =   0   'False
  157.          Italic          =   0   'False
  158.          Strikethrough   =   0   'False
  159.       EndProperty
  160.       ForeColor       =   &H00FFFFFF&
  161.       Height          =   525
  162.       Index           =   2
  163.       Left            =   480
  164.       TabIndex        =   1
  165.       Top             =   4080
  166.       Width           =   2640
  167.    End
  168.    Begin VB.Label lblButton 
  169.       AutoSize        =   -1  'True
  170.       BackColor       =   &H00000000&
  171.       BackStyle       =   0  'Transparent
  172.       Caption         =   "New Game"
  173.       BeginProperty Font 
  174.          Name            =   "Times New Roman"
  175.          Size            =   26.25
  176.          Charset         =   0
  177.          Weight          =   400
  178.          Underline       =   0   'False
  179.          Italic          =   0   'False
  180.          Strikethrough   =   0   'False
  181.       EndProperty
  182.       ForeColor       =   &H000000FF&
  183.       Height          =   525
  184.       Index           =   1
  185.       Left            =   480
  186.       TabIndex        =   0
  187.       Top             =   2400
  188.       Width           =   2550
  189.    End
  190. Attribute VB_Name = "frmStartup"
  191. Attribute VB_GlobalNameSpace = False
  192. Attribute VB_Creatable = False
  193. Attribute VB_PredeclaredId = True
  194. Attribute VB_Exposed = False
  195. Option Explicit
  196. Dim current As Integer  'holds the currently selected label
  197. Private Sub Form_Load()
  198.     Dim slash As String
  199.     'show that the origional screen settings have not yet been saved
  200.     OldBPP = 0
  201.     'change the settings to 640 x 480 x 16 for fastest possible game speeds
  202.     InitializeRes
  203.     'set the initial label to New
  204.     current = 1
  205.     'see if the end of the path has a back slash on it
  206.     slash = ""
  207.     If Right(App.Path, 1) <> "\" Then slash = "\"
  208.     sndStep = App.Path & slash & "1.wav"
  209.     sndButton = App.Path & slash & "2.wav"
  210. End Sub
  211. Private Sub lblButton_Click(Index As Integer)
  212.     Call sndPlaySound(sndButton, &H1)
  213.     'act based on which label is click on
  214.     Select Case (Index)
  215.     Case Is = 0 'the resume game button
  216.         'check to see if there is a game in progress
  217.         If GameInProgress = True Then
  218.             'hide this form, and show the main one
  219.             frmDisplay.Show
  220.             frmStartup.Hide
  221.         Else
  222.             'my custom message box
  223.             Call msg("No game in progress, cannot resume", frmStartup)
  224.         End If
  225.     Case Is = 1 'the new game button
  226.         'show the resume game button, for later
  227.         lblButton(0).Visible = True
  228.         lblButton(0).ForeColor = QBColor(12)
  229.         lblButton(1).ForeColor = QBColor(15)
  230.         current = 0
  231.         'hide this form, show the new game window
  232.         frmNew.Show
  233.         frmStartup.Hide
  234.         'show that the game has started
  235.     Case Is = 2
  236.         Call msg("Not Yet Imlimented.", frmStartup)
  237.     Case Is = 3 'the options button
  238.         frmOptions.Visible = True
  239.         frmStartup.Enabled = False
  240.     Case Is = 6
  241.     FrmBattle.Show
  242.     Case Is = 4 'the quit label
  243.         Call restoreRes
  244.         End
  245.     End Select
  246. End Sub
  247. Private Sub lblButton_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  248.     'see if a new label has been selected
  249.     If current <> Index Then
  250.         
  251.         'if it has